<?php
// +----------------------------------------------------------------------
// | 网站单页,友情链接
// +----------------------------------------------------------------------

namespace Home\Controller;
use Common\Controller\Base;
use Common\Model\Model;

class AboutController extends Base {

    //单页信息详情
    public function read(){
        $entitle=I('get.entitle');
        if(empty($entitle)){
            $this->error('您访问的页面不存在!');
        }
        $data=M('Single')->where(array('status'=>true,'entitle'=>$entitle))->find();
        if($data){
            $this->assign('data',$data);
        }else{
            $this->error('您访问的页面不存在!');
        }
        $this->display();
    }

    //友情链接列表
    public function link(){

        $this->linktxt=M('Link')->field('title,linkurl')->where(array('status'=>true))->order('sort DESC')->select();
        $this->linkpic=M('Link')->field('image,linkurl')->where(array('status'=>true))->order('sort DESC')->select();

        $this->display();
    }
}